

class School_menber(object):
    def __init__(self, name, age, sex):
        self.name = name
        self.age = age
        self.sex = sex

    def tell(self):
        print('用户的name是：%s' % self.name)


class Student(School_menber):
    def __init__(self, name, age, sex, id):
        #继承上一个类的构造方法
        super(Student, self).__init__(name, age, sex)
        self.id = id

    def haha(self):
        print('用户的name是：%s,id是%s' % (self.name, self.id))

s = Student('刘奇', '11', '男', '123')
s.haha()
